<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: /HElib/include/helib/IndexSet.h Source File</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d0c4ae63660968bf6b1c77a1e8aecf95.html">helib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">IndexSet.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_index_set_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* Copyright (C) 2012-2020 IBM Corp.</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This program is Licensed under the Apache License, Version 2.0</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * (the &quot;License&quot;); you may not use this file except in compliance</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * with the License. You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *   http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * limitations under the License. See accompanying LICENSE file.</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#ifndef HELIB_INDEXSET_H</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#define HELIB_INDEXSET_H</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_numb_th_8h.html">helib/NumbTh.h</a>&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacehelib.html">helib</a> {</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set.html">   30</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_index_set.html">IndexSet</a></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;{</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;  std::vector&lt;bool&gt; rep;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  <span class="comment">// NOTE: modern versions of C++ are supposed</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  <span class="comment">// to implement this efficiently as a &quot;specialized template class&quot;.</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  <span class="comment">// Older versions of C++ define the equivalent class bit_std::vector.</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  <span class="keywordtype">long</span> _first, _last, _card;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  <span class="comment">// Invariant: if _card == 0, then _first = 0, _last = -1;</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;  <span class="comment">// otherwise, _first (resp. _last) is the lowest (resp. highest)</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;  <span class="comment">// index in the set.</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;  <span class="comment">// In any case, the std::vector rep always defines the characteristic</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;  <span class="comment">// function of the set.</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;  <span class="comment">// private helper function</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;  <span class="keywordtype">void</span> intervalConstructor(<span class="keywordtype">long</span> low, <span class="keywordtype">long</span> high);</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160; </div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="comment">  /*** constructors ***/</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160; </div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;  <span class="comment">// @brief No-argument constructor, creates empty set</span></div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set.html#a311ea65063a86b068e02f29bbef82f95">   53</a></span>&#160;  <a class="code" href="classhelib_1_1_index_set.html#a311ea65063a86b068e02f29bbef82f95">IndexSet</a>() : _first(0), _last(-1), _card(0) {}</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  <span class="comment">// @brief Constructs an interval, low to high</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set.html#ae170999453ca33a0fdd73d0505c098d3">   56</a></span>&#160;  <a class="code" href="classhelib_1_1_index_set.html#ae170999453ca33a0fdd73d0505c098d3">IndexSet</a>(<span class="keywordtype">long</span> low, <span class="keywordtype">long</span> high) { intervalConstructor(low, high); }</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160; </div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <span class="comment">// @brief Constructs a singleton set</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set.html#a7eaa00acd0e00b7e3ad2b56f237b39d1">   59</a></span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classhelib_1_1_index_set.html#a7eaa00acd0e00b7e3ad2b56f237b39d1">IndexSet</a>(<span class="keywordtype">long</span> j) { intervalConstructor(j, j); }</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160; </div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;  <span class="comment">// copy constructor: use the built-in copy constructor</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160; </div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="comment">  /*** assignment ***/</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  <span class="comment">// assignment: use the built-in assignment operator</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160; </div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set.html#a30a96e32a1bec249fb56f83bbb6f4afa">   68</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_index_set.html#a30a96e32a1bec249fb56f83bbb6f4afa">first</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> _first; }</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set.html#a8156f49ca3715bf0cf9c63ac8dc02172">   71</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_index_set.html#a8156f49ca3715bf0cf9c63ac8dc02172">last</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> _last; }</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_index_set.html#a5690665e0de625096ca1091ea3c39f74">next</a>(<span class="keywordtype">long</span> j) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  <span class="comment">// @brief Returns the previous element before j, if any; otherwise j-1</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_index_set.html#a3f8736538b75cd634a551a896b374ca5">prev</a>(<span class="keywordtype">long</span> j) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160; </div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set.html#a018572f1e76bc3c9750491f2cf02c7ca">   80</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_index_set.html#a018572f1e76bc3c9750491f2cf02c7ca">card</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> _card; }</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160; </div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_index_set.html#acefa7b80f5a87642f706e726063ec462">contains</a>(<span class="keywordtype">long</span> j) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_index_set.html#acefa7b80f5a87642f706e726063ec462">contains</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_index_set.html">IndexSet</a>&amp; s) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_index_set.html#ad782cd0552490506f78ca1ef492be1bd">disjointFrom</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_index_set.html">IndexSet</a>&amp; s) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="comment">  /*** comparison ***/</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160; </div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_index_set.html#abdcf75d71242088ff55d12718beb6442">operator==</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_index_set.html">IndexSet</a>&amp; s) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set.html#a6d953c9d1a5618c1ee2ed585ff75823d">   95</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_index_set.html#a6d953c9d1a5618c1ee2ed585ff75823d">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_index_set.html">IndexSet</a>&amp; s)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == s); }</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160; </div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;<span class="comment">  /*** update methods ***/</span></div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160; </div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_index_set.html#a8b52e2294f9cf2596d4245a24105555b">clear</a>();</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160; </div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_index_set.html#aa2957053dea143c8ca64766f514306c3">insert</a>(<span class="keywordtype">long</span> j);</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160; </div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_index_set.html#a7444b5370e0abbbff89c27215912e14d">remove</a>(<span class="keywordtype">long</span> j);</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_index_set.html#aa2957053dea143c8ca64766f514306c3">insert</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_index_set.html">IndexSet</a>&amp; s);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160; </div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_index_set.html#a7444b5370e0abbbff89c27215912e14d">remove</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_index_set.html">IndexSet</a>&amp; s);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160; </div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_index_set.html#aeeac81a9e8892756bfaab435ec17e7b0">retain</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_index_set.html">IndexSet</a>&amp; s);</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="classhelib_1_1_index_set.html">IndexSet</a>&amp; <a class="code" href="classhelib_1_1_index_set.html#aa05a17c00d661f9316d0b5caa20dac98">emptySet</a>();</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160; </div>
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set.html#a4d96dce11e3a0564e8b59b3eaff947d2">  121</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_index_set.html#a4d96dce11e3a0564e8b59b3eaff947d2">isInterval</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (_card == (1 + _last - _first)); }</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="comment">  /*** raw IO ***/</span></div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_index_set.html#a15ee7d50c3970d27013b11bf1bcb3dc4">read</a>(std::istream&amp; str);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_index_set.html#a85857593c8930b1694bac62725e84caf">write</a>(std::ostream&amp; str) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160; </div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="comment">  /*** code to allow one to write &quot;for (long i: set)&quot; ***/</span></div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; </div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set_1_1iterator.html">  129</a></span>&#160;  <span class="keyword">class </span><a class="code" href="classhelib_1_1_index_set_1_1iterator.html">iterator</a></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;  {</div>
<div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set_1_1iterator.html#add469a0063023e5ade22035cbaf464fe">  131</a></span>&#160;    <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classhelib_1_1_index_set.html">IndexSet</a>;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;  <span class="keyword">public</span>:</div>
<div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set_1_1iterator.html#a802da7966c846a2af7a1f57c5591f1d7">  134</a></span>&#160;    <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_index_set_1_1iterator.html#a802da7966c846a2af7a1f57c5591f1d7">operator*</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> i_; }</div>
<div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set_1_1iterator.html#a9a0ebc80e939d244bf66bed5e1ab8b46">  135</a></span>&#160;    <a class="code" href="classhelib_1_1_index_set_1_1iterator.html">iterator</a>&amp; <a class="code" href="classhelib_1_1_index_set_1_1iterator.html#a9a0ebc80e939d244bf66bed5e1ab8b46">operator++</a>()</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    {</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;      i_ = s_.<a class="code" href="classhelib_1_1_index_set.html#a5690665e0de625096ca1091ea3c39f74">next</a>(i_);</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;      <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    }</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160; </div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set_1_1iterator.html#a4438dc76649c35abd4cb43e01d5edcfb">  141</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_index_set_1_1iterator.html#a4438dc76649c35abd4cb43e01d5edcfb">operator==</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_index_set_1_1iterator.html">iterator</a>&amp; other)<span class="keyword"> const</span></div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;      <span class="keywordflow">return</span> &amp;s_ == &amp;other.s_ &amp;&amp; i_ == other.i_;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    }</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set_1_1iterator.html#a4df0ebcb1167e61251b269f193180268">  146</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_index_set_1_1iterator.html#a4df0ebcb1167e61251b269f193180268">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_index_set_1_1iterator.html">iterator</a>&amp; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == other); }</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160; </div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;  <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set_1_1iterator.html#ab59e4d4df42591d0090ef3366270484a">  149</a></span>&#160;    <a class="code" href="classhelib_1_1_index_set_1_1iterator.html#ab59e4d4df42591d0090ef3366270484a">iterator</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_index_set.html">IndexSet</a>&amp; s, <span class="keywordtype">long</span> i) : s_(s), i_(i) {}</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160; </div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;  <span class="keyword">private</span>:</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="keyword">const</span> <a class="code" href="classhelib_1_1_index_set.html">IndexSet</a>&amp; s_;</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="keywordtype">long</span> i_;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;  };</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160; </div>
<div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set.html#a3628703e1131efbb57a2e4a4282d5b9e">  156</a></span>&#160;  <a class="code" href="classhelib_1_1_index_set_1_1iterator.html">iterator</a> <a class="code" href="classhelib_1_1_index_set.html#a3628703e1131efbb57a2e4a4282d5b9e">begin</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classhelib_1_1_index_set_1_1iterator.html">iterator</a>(*<span class="keyword">this</span>, this-&gt;<a class="code" href="classhelib_1_1_index_set.html#a30a96e32a1bec249fb56f83bbb6f4afa">first</a>()); }</div>
<div class="line"><a name="l00157"></a><span class="lineno"><a class="line" href="classhelib_1_1_index_set.html#a1d8eb89ec5e24f0dc1a5097af9bb3027">  157</a></span>&#160;  <a class="code" href="classhelib_1_1_index_set_1_1iterator.html">iterator</a> <a class="code" href="classhelib_1_1_index_set.html#a1d8eb89ec5e24f0dc1a5097af9bb3027">end</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classhelib_1_1_index_set_1_1iterator.html">iterator</a>(*<span class="keyword">this</span>, this-&gt;<a class="code" href="classhelib_1_1_index_set.html#a8156f49ca3715bf0cf9c63ac8dc02172">last</a>() + 1); }</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;};</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160; </div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;<span class="comment">// some high-level convenience methods...not very efficient...</span></div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;<span class="comment">// not sure if we really need these</span></div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160; </div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;IndexSet <a class="code" href="namespacehelib.html#a8172413911da7a2c6f38d9eb34899140">operator|</a>(<span class="keyword">const</span> IndexSet&amp; s, <span class="keyword">const</span> IndexSet&amp; t);</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160; </div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;IndexSet <a class="code" href="namespacehelib.html#acf1a512fb48fe7d9cfc27c26a727ed6f">operator&amp;</a>(<span class="keyword">const</span> IndexSet&amp; s, <span class="keyword">const</span> IndexSet&amp; t);</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160; </div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;IndexSet <a class="code" href="namespacehelib.html#af6f7e4e0b2339b3ac2e3b7a761357d0c">operator^</a>(<span class="keyword">const</span> IndexSet&amp; s, <span class="keyword">const</span> IndexSet&amp; t);</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160; </div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;IndexSet <a class="code" href="namespacehelib.html#a32e627abcebb74bf780514be8d6c744c">operator/</a>(<span class="keyword">const</span> IndexSet&amp; s, <span class="keyword">const</span> IndexSet&amp; t);</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160; </div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;<span class="comment">// I/O operator</span></div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;std::ostream&amp; <a class="code" href="namespacehelib.html#addc58993c7093dd07d98335bab200e82">operator&lt;&lt;</a>(std::ostream&amp; str, <span class="keyword">const</span> IndexSet&amp; set);</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;std::istream&amp; <a class="code" href="namespacehelib.html#a84b37f68c4bdc42558ad0360b00984fb">operator&gt;&gt;</a>(std::istream&amp; str, IndexSet&amp; set);</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160; </div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;<span class="keywordtype">long</span> <a class="code" href="namespacehelib.html#ab2d7f36557c69a4840112f35af186a29">card</a>(<span class="keyword">const</span> IndexSet&amp; s);</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160; </div>
<div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="namespacehelib.html#ad94835a294c90ee0ea0336561c8f38ad">  182</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespacehelib.html#ad94835a294c90ee0ea0336561c8f38ad">empty</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_index_set.html">IndexSet</a>&amp; s) { <span class="keywordflow">return</span> s.<a class="code" href="classhelib_1_1_index_set.html#a018572f1e76bc3c9750491f2cf02c7ca">card</a>() == 0; }</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160; </div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="namespacehelib.html#aa13e586e5a2a1ea2fd8fe9e3c45b4c98">operator&lt;=</a>(<span class="keyword">const</span> IndexSet&amp; s1, <span class="keyword">const</span> IndexSet&amp; s2);</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160; </div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="namespacehelib.html#abd46fc7a6f4b03ce4a28aea9e7c0a451">operator&lt;</a>(<span class="keyword">const</span> IndexSet&amp; s1, <span class="keyword">const</span> IndexSet&amp; s2);</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160; </div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="namespacehelib.html#a4807b29449792c9a8456921063d03c91">operator&gt;=</a>(<span class="keyword">const</span> IndexSet&amp; s1, <span class="keyword">const</span> IndexSet&amp; s2);</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160; </div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="namespacehelib.html#ab7d409fa53b729e5d370d032f643f321">operator&gt;</a>(<span class="keyword">const</span> IndexSet&amp; s1, <span class="keyword">const</span> IndexSet&amp; s2);</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160; </div>
<div class="line"><a name="l00197"></a><span class="lineno"><a class="line" href="namespacehelib.html#a9a593337ace30bc0dd968cae8ed4564b">  197</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespacehelib.html#a9a593337ace30bc0dd968cae8ed4564b">disjoint</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_index_set.html">IndexSet</a>&amp; s1, <span class="keyword">const</span> <a class="code" href="classhelib_1_1_index_set.html">IndexSet</a>&amp; s2)</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;{</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;  <span class="keywordflow">return</span> s1.<a class="code" href="classhelib_1_1_index_set.html#ad782cd0552490506f78ca1ef492be1bd">disjointFrom</a>(s2);</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;}</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160; </div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;} <span class="comment">// namespace helib</span></div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160; </div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;<span class="preprocessor">#endif // ifndef HELIB_INDEXSET_H</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclasshelib_1_1_index_set_html_a1d8eb89ec5e24f0dc1a5097af9bb3027"><div class="ttname"><a href="classhelib_1_1_index_set.html#a1d8eb89ec5e24f0dc1a5097af9bb3027">helib::IndexSet::end</a></div><div class="ttdeci">iterator end() const</div><div class="ttdef"><b>Definition:</b> IndexSet.h:157</div></div>
<div class="ttc" id="anamespacehelib_html_a8172413911da7a2c6f38d9eb34899140"><div class="ttname"><a href="namespacehelib.html#a8172413911da7a2c6f38d9eb34899140">helib::operator|</a></div><div class="ttdeci">IndexSet operator|(const IndexSet &amp;s, const IndexSet &amp;t)</div><div class="ttdoc">union</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:232</div></div>
<div class="ttc" id="anamespacehelib_html_abd46fc7a6f4b03ce4a28aea9e7c0a451"><div class="ttname"><a href="namespacehelib.html#abd46fc7a6f4b03ce4a28aea9e7c0a451">helib::operator&lt;</a></div><div class="ttdeci">bool operator&lt;(const IndexSet &amp;s1, const IndexSet &amp;s2)</div><div class="ttdoc">Is s1 strict subset of s2.</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:272</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_a3628703e1131efbb57a2e4a4282d5b9e"><div class="ttname"><a href="classhelib_1_1_index_set.html#a3628703e1131efbb57a2e4a4282d5b9e">helib::IndexSet::begin</a></div><div class="ttdeci">iterator begin() const</div><div class="ttdef"><b>Definition:</b> IndexSet.h:156</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_abdcf75d71242088ff55d12718beb6442"><div class="ttname"><a href="classhelib_1_1_index_set.html#abdcf75d71242088ff55d12718beb6442">helib::IndexSet::operator==</a></div><div class="ttdeci">bool operator==(const IndexSet &amp;s) const</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:103</div></div>
<div class="ttc" id="anamespacehelib_html_ad94835a294c90ee0ea0336561c8f38ad"><div class="ttname"><a href="namespacehelib.html#ad94835a294c90ee0ea0336561c8f38ad">helib::empty</a></div><div class="ttdeci">bool empty(const IndexSet &amp;s)</div><div class="ttdef"><b>Definition:</b> IndexSet.h:182</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_acefa7b80f5a87642f706e726063ec462"><div class="ttname"><a href="classhelib_1_1_index_set.html#acefa7b80f5a87642f706e726063ec462">helib::IndexSet::contains</a></div><div class="ttdeci">bool contains(long j) const</div><div class="ttdoc">Returns true iff the set contains j.</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:76</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_1_1iterator_html_a4438dc76649c35abd4cb43e01d5edcfb"><div class="ttname"><a href="classhelib_1_1_index_set_1_1iterator.html#a4438dc76649c35abd4cb43e01d5edcfb">helib::IndexSet::iterator::operator==</a></div><div class="ttdeci">bool operator==(const iterator &amp;other) const</div><div class="ttdef"><b>Definition:</b> IndexSet.h:141</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_a8156f49ca3715bf0cf9c63ac8dc02172"><div class="ttname"><a href="classhelib_1_1_index_set.html#a8156f49ca3715bf0cf9c63ac8dc02172">helib::IndexSet::last</a></div><div class="ttdeci">long last() const</div><div class="ttdoc">Returns the last element, -1 if the set is empty.</div><div class="ttdef"><b>Definition:</b> IndexSet.h:71</div></div>
<div class="ttc" id="anamespacehelib_html_acf1a512fb48fe7d9cfc27c26a727ed6f"><div class="ttname"><a href="namespacehelib.html#acf1a512fb48fe7d9cfc27c26a727ed6f">helib::operator&amp;</a></div><div class="ttdeci">IndexSet operator&amp;(const IndexSet &amp;s, const IndexSet &amp;t)</div><div class="ttdoc">intersection</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:240</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_a018572f1e76bc3c9750491f2cf02c7ca"><div class="ttname"><a href="classhelib_1_1_index_set.html#a018572f1e76bc3c9750491f2cf02c7ca">helib::IndexSet::card</a></div><div class="ttdeci">long card() const</div><div class="ttdoc">The cardinality of the set.</div><div class="ttdef"><b>Definition:</b> IndexSet.h:80</div></div>
<div class="ttc" id="a_numb_th_8h_html"><div class="ttname"><a href="_numb_th_8h.html">NumbTh.h</a></div><div class="ttdoc">Miscellaneous utility functions.</div></div>
<div class="ttc" id="anamespacehelib_html_ab7d409fa53b729e5d370d032f643f321"><div class="ttname"><a href="namespacehelib.html#ab7d409fa53b729e5d370d032f643f321">helib::operator&gt;</a></div><div class="ttdeci">bool operator&gt;(const IndexSet &amp;s1, const IndexSet &amp;s2)</div><div class="ttdoc">Is s2 strict subset of s1.</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:282</div></div>
<div class="ttc" id="anamespacehelib_html_a32e627abcebb74bf780514be8d6c744c"><div class="ttname"><a href="namespacehelib.html#a32e627abcebb74bf780514be8d6c744c">helib::operator/</a></div><div class="ttdeci">IndexSet operator/(const IndexSet &amp;s, const IndexSet &amp;t)</div><div class="ttdoc">set minus</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:256</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_a4d96dce11e3a0564e8b59b3eaff947d2"><div class="ttname"><a href="classhelib_1_1_index_set.html#a4d96dce11e3a0564e8b59b3eaff947d2">helib::IndexSet::isInterval</a></div><div class="ttdeci">bool isInterval() const</div><div class="ttdoc">Is this set a contiguous interval?</div><div class="ttdef"><b>Definition:</b> IndexSet.h:121</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_ad782cd0552490506f78ca1ef492be1bd"><div class="ttname"><a href="classhelib_1_1_index_set.html#ad782cd0552490506f78ca1ef492be1bd">helib::IndexSet::disjointFrom</a></div><div class="ttdeci">bool disjointFrom(const IndexSet &amp;s) const</div><div class="ttdoc">Returns true iff the set is disjoint from s.</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:91</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_ae170999453ca33a0fdd73d0505c098d3"><div class="ttname"><a href="classhelib_1_1_index_set.html#ae170999453ca33a0fdd73d0505c098d3">helib::IndexSet::IndexSet</a></div><div class="ttdeci">IndexSet(long low, long high)</div><div class="ttdef"><b>Definition:</b> IndexSet.h:56</div></div>
<div class="ttc" id="anamespacehelib_html_ab2d7f36557c69a4840112f35af186a29"><div class="ttname"><a href="namespacehelib.html#ab2d7f36557c69a4840112f35af186a29">helib::card</a></div><div class="ttdeci">long card(const IndexSet &amp;s)</div><div class="ttdoc">Functional cardinality.</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:264</div></div>
<div class="ttc" id="anamespacehelib_html_a4807b29449792c9a8456921063d03c91"><div class="ttname"><a href="namespacehelib.html#a4807b29449792c9a8456921063d03c91">helib::operator&gt;=</a></div><div class="ttdeci">bool operator&gt;=(const IndexSet &amp;s1, const IndexSet &amp;s2)</div><div class="ttdoc">Is s2 subset or equal to s2.</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:277</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_a311ea65063a86b068e02f29bbef82f95"><div class="ttname"><a href="classhelib_1_1_index_set.html#a311ea65063a86b068e02f29bbef82f95">helib::IndexSet::IndexSet</a></div><div class="ttdeci">IndexSet()</div><div class="ttdef"><b>Definition:</b> IndexSet.h:53</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html"><div class="ttname"><a href="classhelib_1_1_index_set.html">helib::IndexSet</a></div><div class="ttdoc">A dynamic set of non-negative integers.</div><div class="ttdef"><b>Definition:</b> IndexSet.h:31</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_aa2957053dea143c8ca64766f514306c3"><div class="ttname"><a href="classhelib_1_1_index_set.html#aa2957053dea143c8ca64766f514306c3">helib::IndexSet::insert</a></div><div class="ttdeci">void insert(long j)</div><div class="ttdoc">Add j to the set.</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:128</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_a15ee7d50c3970d27013b11bf1bcb3dc4"><div class="ttname"><a href="classhelib_1_1_index_set.html#a15ee7d50c3970d27013b11bf1bcb3dc4">helib::IndexSet::read</a></div><div class="ttdeci">void read(std::istream &amp;str)</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:327</div></div>
<div class="ttc" id="anamespacehelib_html_af6f7e4e0b2339b3ac2e3b7a761357d0c"><div class="ttname"><a href="namespacehelib.html#af6f7e4e0b2339b3ac2e3b7a761357d0c">helib::operator^</a></div><div class="ttdeci">IndexSet operator^(const IndexSet &amp;s, const IndexSet &amp;t)</div><div class="ttdoc">exclusive-or</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:248</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_1_1iterator_html"><div class="ttname"><a href="classhelib_1_1_index_set_1_1iterator.html">helib::IndexSet::iterator</a></div><div class="ttdef"><b>Definition:</b> IndexSet.h:130</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_1_1iterator_html_ab59e4d4df42591d0090ef3366270484a"><div class="ttname"><a href="classhelib_1_1_index_set_1_1iterator.html#ab59e4d4df42591d0090ef3366270484a">helib::IndexSet::iterator::iterator</a></div><div class="ttdeci">iterator(const IndexSet &amp;s, long i)</div><div class="ttdef"><b>Definition:</b> IndexSet.h:149</div></div>
<div class="ttc" id="anamespacehelib_html_aa13e586e5a2a1ea2fd8fe9e3c45b4c98"><div class="ttname"><a href="namespacehelib.html#aa13e586e5a2a1ea2fd8fe9e3c45b4c98">helib::operator&lt;=</a></div><div class="ttdeci">bool operator&lt;=(const IndexSet &amp;s1, const IndexSet &amp;s2)</div><div class="ttdoc">Is s1 subset or equal to s2.</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:267</div></div>
<div class="ttc" id="anamespacehelib_html_a9a593337ace30bc0dd968cae8ed4564b"><div class="ttname"><a href="namespacehelib.html#a9a593337ace30bc0dd968cae8ed4564b">helib::disjoint</a></div><div class="ttdeci">bool disjoint(const IndexSet &amp;s1, const IndexSet &amp;s2)</div><div class="ttdoc">Functional disjoint.</div><div class="ttdef"><b>Definition:</b> IndexSet.h:197</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_a5690665e0de625096ca1091ea3c39f74"><div class="ttname"><a href="classhelib_1_1_index_set.html#a5690665e0de625096ca1091ea3c39f74">helib::IndexSet::next</a></div><div class="ttdeci">long next(long j) const</div><div class="ttdoc">Returns the next element after j, if any; otherwise j+1.</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:48</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_aa05a17c00d661f9316d0b5caa20dac98"><div class="ttname"><a href="classhelib_1_1_index_set.html#aa05a17c00d661f9316d0b5caa20dac98">helib::IndexSet::emptySet</a></div><div class="ttdeci">static const IndexSet &amp; emptySet()</div><div class="ttdoc">Read-only access to an empty set.</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:18</div></div>
<div class="ttc" id="anamespacehelib_html"><div class="ttname"><a href="namespacehelib.html">helib</a></div><div class="ttdef"><b>Definition:</b> apiAttributes.h:21</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_a8b52e2294f9cf2596d4245a24105555b"><div class="ttname"><a href="classhelib_1_1_index_set.html#a8b52e2294f9cf2596d4245a24105555b">helib::IndexSet::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdoc">Set to the empty set.</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:120</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_a30a96e32a1bec249fb56f83bbb6f4afa"><div class="ttname"><a href="classhelib_1_1_index_set.html#a30a96e32a1bec249fb56f83bbb6f4afa">helib::IndexSet::first</a></div><div class="ttdeci">long first() const</div><div class="ttdoc">Returns the first element, 0 if the set is empty.</div><div class="ttdef"><b>Definition:</b> IndexSet.h:68</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_aeeac81a9e8892756bfaab435ec17e7b0"><div class="ttname"><a href="classhelib_1_1_index_set.html#aeeac81a9e8892756bfaab435ec17e7b0">helib::IndexSet::retain</a></div><div class="ttdeci">void retain(const IndexSet &amp;s)</div><div class="ttdoc">Retains only those elements that are also in s (intersection)</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:214</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_1_1iterator_html_a9a0ebc80e939d244bf66bed5e1ab8b46"><div class="ttname"><a href="classhelib_1_1_index_set_1_1iterator.html#a9a0ebc80e939d244bf66bed5e1ab8b46">helib::IndexSet::iterator::operator++</a></div><div class="ttdeci">iterator &amp; operator++()</div><div class="ttdef"><b>Definition:</b> IndexSet.h:135</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_a3f8736538b75cd634a551a896b374ca5"><div class="ttname"><a href="classhelib_1_1_index_set.html#a3f8736538b75cd634a551a896b374ca5">helib::IndexSet::prev</a></div><div class="ttdeci">long prev(long j) const</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:62</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_a7444b5370e0abbbff89c27215912e14d"><div class="ttname"><a href="classhelib_1_1_index_set.html#a7444b5370e0abbbff89c27215912e14d">helib::IndexSet::remove</a></div><div class="ttdeci">void remove(long j)</div><div class="ttdoc">Remove j from the set.</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:154</div></div>
<div class="ttc" id="anamespacehelib_html_addc58993c7093dd07d98335bab200e82"><div class="ttname"><a href="namespacehelib.html#addc58993c7093dd07d98335bab200e82">helib::operator&lt;&lt;</a></div><div class="ttdeci">std::ostream &amp; operator&lt;&lt;(std::ostream &amp;s, const SKHandle &amp;handle)</div><div class="ttdef"><b>Definition:</b> Ctxt.h:189</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_a85857593c8930b1694bac62725e84caf"><div class="ttname"><a href="classhelib_1_1_index_set.html#a85857593c8930b1694bac62725e84caf">helib::IndexSet::write</a></div><div class="ttdeci">void write(std::ostream &amp;str) const</div><div class="ttdef"><b>Definition:</b> IndexSet.cpp:316</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_1_1iterator_html_a802da7966c846a2af7a1f57c5591f1d7"><div class="ttname"><a href="classhelib_1_1_index_set_1_1iterator.html#a802da7966c846a2af7a1f57c5591f1d7">helib::IndexSet::iterator::operator*</a></div><div class="ttdeci">long operator*() const</div><div class="ttdef"><b>Definition:</b> IndexSet.h:134</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_a7eaa00acd0e00b7e3ad2b56f237b39d1"><div class="ttname"><a href="classhelib_1_1_index_set.html#a7eaa00acd0e00b7e3ad2b56f237b39d1">helib::IndexSet::IndexSet</a></div><div class="ttdeci">IndexSet(long j)</div><div class="ttdef"><b>Definition:</b> IndexSet.h:59</div></div>
<div class="ttc" id="anamespacehelib_html_a84b37f68c4bdc42558ad0360b00984fb"><div class="ttname"><a href="namespacehelib.html#a84b37f68c4bdc42558ad0360b00984fb">helib::operator&gt;&gt;</a></div><div class="ttdeci">std::istream &amp; operator&gt;&gt;(std::istream &amp;s, CtxtPart &amp;p)</div><div class="ttdef"><b>Definition:</b> Ctxt.cpp:1882</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_1_1iterator_html_a4df0ebcb1167e61251b269f193180268"><div class="ttname"><a href="classhelib_1_1_index_set_1_1iterator.html#a4df0ebcb1167e61251b269f193180268">helib::IndexSet::iterator::operator!=</a></div><div class="ttdeci">bool operator!=(const iterator &amp;other) const</div><div class="ttdef"><b>Definition:</b> IndexSet.h:146</div></div>
<div class="ttc" id="aclasshelib_1_1_index_set_html_a6d953c9d1a5618c1ee2ed585ff75823d"><div class="ttname"><a href="classhelib_1_1_index_set.html#a6d953c9d1a5618c1ee2ed585ff75823d">helib::IndexSet::operator!=</a></div><div class="ttdeci">bool operator!=(const IndexSet &amp;s) const</div><div class="ttdef"><b>Definition:</b> IndexSet.h:95</div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
